package cn.edu.cug.cs.gtl.apis.render.nodes;

import cn.edu.cug.cs.gtl.apis.render.basics.*;
import cn.edu.cug.cs.gtl.apis.render.paths.Path;

public interface Camera extends Node{
    /**
     * Returns the viewport region this camera would use to render into the given viewport region, accounting for cropping.
     *
     * @param region
     * @return
     */
    ViewportRegion getViewportBounds(ViewportRegion region);

    /**
     * Calls getViewVolume((float)0.0).
     * @return
     */
    ViewVolume	getViewVolume();

    /**
     *
     Returns a view volume object, based on the camera's viewing parameters.
     * @param useAspectRatio
     * @return
     */
    ViewVolume	getViewVolume(float useAspectRatio);

    /**
     * Computes a view volume from the given parameters.
     * @param aspectRatio
     * @param nearDist
     * @param farDist
     * @param position
     * @param rotation
     * @return
     */
    ViewVolume getViewVolume(float aspectRatio, float nearDist, float farDist, Vec3f position, Rotation rotation);

    /**
     * Scales the height of the camera.
     * @param scaleFactor
     */
    void	scaleHeight(float scaleFactor);

    /**
     * Calls viewAll(sceneRoot, vpRegion, (float)1.0).
     * @param sceneRoot
     * @param vpRegion
     */
    void	viewAll(Node sceneRoot, ViewportRegion vpRegion);

    /**
     * Sets the camera to view the scene rooted by the given node.
     * @param sceneRoot
     * @param vpRegion
     * @param slack
     */
    void	viewAll(Node sceneRoot, ViewportRegion vpRegion, float slack);

    /**
     *
     * Sets the camera to view the region defined by the given bounding box.
     * @param bbox
     * @param vpRegion
     */
    void	viewAll(Box3f bbox, ViewportRegion vpRegion);

    /**
     * Calls viewAll(path, vpRegion, (float)1.0).
     * @param path
     * @param vpRegion
     */
    void	viewAll(Path path, ViewportRegion vpRegion);

    /**
     * Sets the camera to view the scene defined by the given path.
     * @param path
     * @param vpRegion
     * @param slack
     */
    void	viewAll(Path path, ViewportRegion vpRegion, float slack);

}
